Telegram Group & Telegram Channel
Вопрос с собеседования

Может ли интерфейс содержать поля?

Ответ: Да, но только постоянные значения. Любое поле в интерфейсе автоматически становится public static final, то есть это всегда константа, общая для всех.

Интерфейс не может содержать обычные переменные, потому что он не хранит состояние объектов — только описывает поведение.


tags: #собеседование

📱 Java Developer  | Чат
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/java_tg/3080
Create:
Last Update:

Вопрос с собеседования

Может ли интерфейс содержать поля?

Ответ: Да, но только постоянные значения. Любое поле в интерфейсе автоматически становится public static final, то есть это всегда константа, общая для всех.

Интерфейс не может содержать обычные переменные, потому что он не хранит состояние объектов — только описывает поведение.


tags: #собеседование

📱 Java Developer  | Чат

BY Java Developer


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_tg/3080

View MORE
Open in Telegram


Java Developer Telegram | DID YOU KNOW?

Date: |

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Java Developer from it


Telegram Java Developer
FROM USA